package org.jeecg.modules.business.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.business.dto.*;
import org.jeecg.modules.business.entity.*;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.modules.business.vo.*;
import org.jeecg.modules.rooms.Vo.FloorBuildingRoomVo;
import org.jeecg.modules.rooms.Vo.LivingContinueVo;
import org.jeecg.modules.rooms.entity.CesAllDayPriceRule;
import org.jeecg.modules.rooms.entity.CesHouseLongRentScheme;
import org.jeecg.modules.rooms.entity.CesRooms;

import java.math.BigDecimal;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Description: 酒店预定订单
 * @Author: jeecg-boot
 * @Date:   2023-03-25
 * @Version: V1.0
 */
public interface IBusRoomBookingOrdersService extends IService<BusRoomBookingOrders> {

    String bookingOrderSave(BookingOrderSaveDto item, Boolean isTeam,Boolean isLiving,String hotelId);

    BookingOrderEditVo getBookingInfoById(String orderId, String bookingNo);

    Boolean editBooking(BookingOrderEditVo param);

    Boolean removeOrder(String id);

    Boolean setOrderStatus(BusRoomBookingOrders entity);

    BatchOrderEditVo batchOrderDetail(String batchId);

    String batchOrderSave(BatchOrderSavaDto item);

    Boolean setBatchOrderStatus(BusBookingBatch batchOrder);
    String bookingToLive(String bookingRoomId, List<BusLivingCustomer> customers, String hotelId, Boolean bookingLiving, BookingLayoutRoomsDto roomInfo, List<BusLivingLayoutDayPrice> livingRoomDayPrices);

    String customerLiving(BookingOrderSaveDto livingData, Boolean isTeam, String hotelId);

    List<FloorBuildingRoomVo> getRealtimeInfo(List<CesRooms> rooms);

    List<BusOrderFee> getLivingOrderFee(String orderId, Boolean isAllFee);

    Boolean syncDayRoomFee(String hotelId);
    Boolean syncRoomOverTimeOrder(String hotelId);
    BigDecimal getOrderFeeTotal(String livingOrderId,String bookingOrderId);
    Boolean settleBillCheckOut(List<BusOrderFee> settleFees, String bookingOrderId);
    Boolean continueLiving2(List<LivingContinueVo> livingContinueList, String hotelId);
    Boolean continueLiving(BusOrderFee settleFee, Date dueOutTime,String livingOrderId,String hotelId);
    Boolean livingSettleBillCheckOut(List<BusOrderFee> settleFees, String livingOrderId);
    Boolean partialSettle(PartialSettleVo param);
    String splitLiving(String livingOrderId);
    Boolean leaveNotSettle(String bookingOrderId, String livingOrderId);
    Boolean cancelLeaveNotSettle(String bookingOrderId, String livingOrderId);
    Boolean cancelLeaveSettle(String bookingOrderId, String livingOrderId);
    IPage<RoomLivingQueryVo> getLivingPageData(Integer status,String keyw, Page<RoomLivingQueryVo> page,String hotelId);
    IPage<RoomLivingQueryVo> getUnionLivingPageData(String keyw, Page<RoomLivingQueryVo> page,String hotelId);
    IPage<KeLiItemVo> getLivingOrderKL(Page<KeLiItemVo> page, KedanOrderDto kedanOrderDto);
    IPage<KeLiItemVo> getBookingOrderKL(Page<KeLiItemVo> page, KedanOrderDto kedanOrderDto);
    Boolean setLivingOrderFee(List<BusOrderFee> fees,String livingOrderId,String hotelId);
    Boolean unionOrder(String roomId,String targetRoomId, String bookingOrderId, String hotelId);
    Boolean mergeOrder(String hotelId, String livingRoomId, List<String> livingOrderId);
    ForwardFangTaiVo forwardFangTai(String start, String end, String hotelId,Boolean isContainLeave);
    RiLiFangTaiResultVo riliFangTai(String start, String end, String hotelId);
    Boolean updateOrderInfo(Integer type, UpdateOrderInfoDto info);
    Boolean updateOrderPrice(UpdateOrderPriceDto info);
    Boolean batchUpdateOrderPrice(List<UpdateOrderPriceDto> infos);
    void syncDayOrderFee();
    void syncDayOrderFeeItem(BusRoomsLivingOrder order, CesAllDayPriceRule allDayRule);
    List<BusRoomBookingOrders> countTodayYD(String hotelId);

    Boolean changeLivingRoom(LivingContinueVo param);

    /**
     * 根据手机号查询入住历史列表
     * @param hotelId
     * @param phone
     * @return
     */
     Page<HashMap<String, Object>> ruZhuHistoryList(Page<HashMap<String, Object>> page, String hotelId, String phone);
     String delBusData(String hotelId);
     Boolean tuidan(List<String> feeId);
     Boolean reverseLiving(String livingOrderId, String hotelId);

//    Long count(String bookingOrderId,String hotelId);

    Boolean canOnlyPaySelf(String bookingOrderId,String hotelId,String roomId);

    List<LivingContinueVo> roomIdBooked(List<LivingContinueVo> livingContinueList);

    Boolean payPortionFee(List<String> feeIds);

    List<LivingContinueVo> getContinueOrder(String livingOrderId, String hotelId);

    void addWillLeaveMess(String parameter);

    void overTimerBooking(String hotelId);
}
